﻿using Microsoft.AspNetCore.Mvc;

namespace Luka;

/// <summary>
/// Swagger 分组特性
/// </summary>
[NotScanned, AttributeUsage(AttributeTargets.Class)]
public sealed class ApiDescriptionAttribute : ApiExplorerSettingsAttribute
{

    public ApiDescriptionAttribute() : base()
    {

    }

    /// <summary>
    /// 构造函数
    /// </summary>
    /// <param name="ignoreApi">是否忽略</param>
    public ApiDescriptionAttribute(bool ignoreApi) : base()
    {
        IgnoreApi = !ignoreApi;
        Order = 0;
    }

    /// <summary>
    /// 版本
    /// </summary>
    public string? Version { get; set; }

    /// <summary>
    /// 描述
    /// </summary>
    public string? Description { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    public int Order { get; set; }
}